package cn.da.shuai.cool.system.model.entity.menu;

import cn.da.shuai.cool.common.entity.EntityBase;
import cn.da.shuai.cool.system.model.enums.menu.MenuType;
import cn.da.shuai.cool.system.model.enums.menu.MenuVisibleType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author 大帅哥
 * @since 2025-01-03
 */

@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
@TableName("cool_menu")
@Schema(name = "CoolMenu", description = "系统菜单表")
public class CoolMenu extends EntityBase {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "菜单名称")
    @TableField("menu_name")
    private String menuName;

    @Schema(description = "父菜单ID")
    @TableField("parent_id")
    private Long parentId;

    @Schema(description = "显示顺序")
    @TableField("order_num")
    private Integer orderNum;

    @Schema(description = "路由地址")
    @TableField("path")
    private String path;

    @Schema(description = "组件路径")
    @TableField("component")
    private String component;

    @Schema(description = "菜单类型（M目录 C菜单 F按钮）")
    @TableField("menu_type")
    private MenuType menuType;

    @Schema(description = "菜单状态（0显示 1隐藏）")
    @TableField("visible")
    private MenuVisibleType visible;

    @Schema(description = "权限标识")
    @TableField("perms")
    private String perms;

    @Schema(description = "菜单图标")
    @TableField("icon")
    private String icon;
}